const express = require('express')
let application = express()

application.get('/', (req, res, next) => {
    // res.send('欢迎来到首页')
    // get参数
    req.name = 'carlos'
    age = 25
    next()
})
application.get('/', (req, res) => {
    // res.send('欢迎来到首页')
    // get参数
    res.send('<h1>' + req.name + age + '</h1>')
})
application.post('/add', (req, res) => {
    res.send('欢迎来到添加页')
    // post参数
    console.log(req.body);
})
application.listen(3007)
console.log('请访问 http://localhost:3007');
